﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
>
  <xsl:output method="xml" indent="yes" encoding="utf-8" media-type="text/xml" />
  <xsl:include href="../Utility.xslt"/>
  <xsl:param name="relrootpath"/>
  <xsl:param name="eventname" />
  <xsl:param name="userid" />
  <xsl:param name="lastupdate" />

  <xsl:template match="/Context">
    <Transform>
      <Content>
        <div class="datetext">
          <xsl:value-of select="$lastupdate"/>
        </div>
        <xsl:apply-templates select="Events[@EventName=$eventname]">
        </xsl:apply-templates>
      </Content>
    </Transform>
  </xsl:template>

  <xsl:template match="Events[@EventName='EventRequestApproved']">
    <div>
      <dl>
        <dt>
          <xsl:call-template name="IconSet">
            <xsl:with-param name="c">ns-calendar</xsl:with-param>
            <xsl:with-param name="title">活动</xsl:with-param>
          </xsl:call-template>
          <span class="iconlabel">
            <control kind="userlink">
              <xsl:attribute name="UserId">
                <xsl:value-of select="$userid"/>
              </xsl:attribute>
            </control>
            <xsl:text>参加了活动 </xsl:text>
            <span>
            <a>
              <xsl:attribute name="href">
                <xsl:value-of select="$relrootpath"/>
                <xsl:text>/Mod/Events/View.aspx?id=</xsl:text>
                <xsl:value-of select="Event/EventId"/>
              </xsl:attribute>
              <xsl:value-of select="Event/EventName"/>
            </a>
            </span>

          </span>
          
        </dt>
      </dl>
    </div>
  </xsl:template>


</xsl:stylesheet>
